package com.wx.chapter10.interface_;

/**
 * ClassName:DBInterface
 * Package :com.wx.chapter10.interface_
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/6/8 - 17:16
 */
public interface DBInterface {
    public void connect();//定义方法规范

    public void close();
}

class MysqlDB implements DBInterface {

    @Override
    public void connect() {
        System.out.println("连接MySql");
    }

    @Override
    public void close() {
        System.out.println("关闭MySql");
    }
}

class OracleDB implements DBInterface {
    @Override
    public void connect() {
        System.out.println("连接Oracle");
    }

    @Override
    public void close() {
        System.out.println("关闭Oracle");
    }
}
